Skip to content

perf(profiler): bound shared zstd encoder concurrency and memory - #5985

Open
AliDatadog wants to merge 2 commits into
mainfrom
ali.b/opt-profiler-zstd-mem
Open

AliDatadog wants to merge 2 commits into
mainfrom
ali.b/opt-profiler-zstd-mem

Conversation

@AliDatadog

@AliDatadog AliDatadog commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

In production Go live-heap profiling of the internal Datadog Agent fleet (service:datadog-agent, 4-hour heap-live-size profile, 126.6 MiB average live heap), the profiler's retained zstd encoder history buffers account for 11.12% of total Go live heap (~14+ MiB per process).

Every Go service running Datadog Continuous Profiler shares a single long-lived zstd encoder to compress outgoing profiles once per minute, with access already serialized by a size-1 semaphore. However, the encoder is currently created with only the compression level option. By default, klauspost/compress/zstd spawns GOMAXPROCS concurrent compression workers and retains history buffers for each of them — pinning ~18–19 MiB of permanent live Go heap per process even on services whose profiles average only ~6 KiB compressed (~25 KiB uncompressed).

Solution

Configure the shared zstd encoder with:

  • Concurrency 1 (single-threaded encoding), matching the existing size-1 semaphore serialization.
  • Lower encoder memory mode, reducing retained internal scratch/history memory.

The default 8 MiB compression window is intentionally kept unchanged so compression ratio remains byte-for-byte identical even on multi-megabyte profiles.

Trade-off Analysis & Why This Is Safe in Production

  1. Compression ratio & network egress (0% change): Compressed output is byte-for-byte identical across all 4 compression levels and all tested payload sizes from 1 KiB up to 10 MiB (~2× the largest profile uploaded across all internal Go services in a 4-hour window).
  2. Wall time vs. CPU time: On large payloads (2–10 MiB), single-threaded encoding increases background wall time by +0.6 to +4.3 ms because work runs on 1 core instead of spreading across multiple cores in parallel. Total CPU time is equal or lower, recompression allocations drop −37%, and on prod-average 25 KiB profiles wall time is actually faster (0.12 ms → 0.07 ms).
  3. High-throughput services & tail latency: Profile compression is not proportional to request throughput — it runs asynchronously in a background goroutine once per 60 seconds (60,000 ms default period), completely off the request path and before the 10 s HTTP upload timeout. Even at 2× our 4-hour fleet-wide peak payload (10 MiB), +4.3 ms is 0.007% of the 60-second window. Running on 1 goroutine also stops the profiler from bursting across GOMAXPROCS cores once per minute and competing with request handlers.
  4. Why we rejected shrinking the window size: We also tested capping the zstd window at 1 MiB (which saved another ~7 MiB on small profiles), but on 4–10 MiB profiles it inflated compressed size by ~2× (166 → 318 KB and 347 → 728 KB). We dropped that option to guarantee zero egress regression.

Production Payload Size Context

Across all internal production Go services (datadog.profiling.go.uploaded_profile_bytes, 4-hour window):

  • Mean compressed upload: 6.1 KiB (~25 KiB uncompressed)
  • Typical fleet max compressed upload: 632 KiB (~2–3 MiB uncompressed)
  • Absolute 4-hour fleet-wide peak compressed upload: 1.38 MiB (~5–6 MiB uncompressed)

Full Benchmark Matrix (30/30 Cells Verified)

Measured on Apple M4 Max (arm64) across all 4 supported zstd levels, 5 payload sizes (1 KiB to 10 MiB = ~2× prod peak, derived from the repository's real heap profile fixture), and GOMAXPROCS=1, 4, 16:

Default Level Across GOMAXPROCS (1, 4, 16)

GOMAXPROCS Input Size Compressed Bytes (Before → After) Wall Time / Profile (Before → After) Retained Live Heap (Before → After)
1 1 KiB 761 → 761 (0%) 0.01 ms → 0.01 ms 1.7 MiB → 1.4 MiB (−17%)
1 25 KiB (prod avg) 8,680 → 8,680 (0%) 0.07 ms → 0.07 ms 1.7 MiB → 1.5 MiB (−15%)
1 311 KiB 108,884 → 108,884 (0%) 1.39 ms → 1.38 ms 18.1 MiB → 10.0 MiB (−44%)
1 2 MiB (prod max-typ) 135,860 → 135,860 (0%) 1.91 ms → 1.93 ms 18.1 MiB → 8.0 MiB (−55%)
1 10 MiB (2× prod peak) 346,657 → 346,657 (0%) 5.86 ms → 8.82 ms (+3.0 ms/min) 18.2 MiB → 0.2 MiB
4 1 KiB 761 → 761 (0%) 0.02 ms → 0.01 ms 2.2 MiB → 1.4 MiB (−37%)
4 25 KiB (prod avg) 8,680 → 8,680 (0%) 0.08 ms → 0.10 ms 2.3 MiB → 1.5 MiB (−35%)
4 311 KiB 108,884 → 108,884 (0%) 1.15 ms → 1.31 ms (+0.16 ms/min) 18.7 MiB → 10.0 MiB (−46%)
4 2 MiB (prod max-typ) 135,860 → 135,860 (0%) 1.51 ms → 1.95 ms (+0.44 ms/min) 18.7 MiB → 8.1 MiB (−57%)
4 10 MiB (2× prod peak) 346,657 → 346,657 (0%) 4.33 ms → 8.45 ms (+4.1 ms/min) 18.9 MiB → 0.2 MiB
16 1 KiB 761 → 761 (0%) 0.02 ms → 0.01 ms 2.2 MiB → 1.4 MiB (−37%)
16 25 KiB (prod avg) 8,680 → 8,680 (0%) 0.12 ms → 0.07 ms (faster) 2.3 MiB → 1.5 MiB (−35%)
16 311 KiB 108,884 → 108,884 (0%) 1.14 ms → 1.33 ms (+0.19 ms/min) 18.7 MiB → 10.0 MiB (−46%)
16 2 MiB (prod max-typ) 135,860 → 135,860 (0%) 1.52 ms → 2.11 ms (+0.59 ms/min) 18.7 MiB → 8.0 MiB (−57%)
16 10 MiB (2× prod peak) 346,657 → 346,657 (0%) 4.57 ms → 8.83 ms (+4.3 ms/min) 18.9 MiB → 0.2 MiB

All 4 Compression Levels (GOMAXPROCS=16)

Level Input Size Compressed Bytes (Before → After) Wall Time / Profile (Before → After) Retained Live Heap (Before → After)
Fastest (1) 25 KiB 8,919 → 8,919 (0%) 0.06 ms → 0.05 ms 1.1 MiB → 0.4 MiB (−61%)
Fastest (1) 311 KiB 120,629 → 120,629 (0%) 0.65 ms → 0.95 ms (+0.30 ms/min) 9.3 MiB → 4.9 MiB (−48%)
Fastest (1) 10 MiB 284,463 → 284,463 (0%) 4.95 ms → 9.16 ms (+4.2 ms/min) 9.5 MiB → <1 MiB
Default (2) 311 KiB 108,884 → 108,884 (0%) 1.14 ms → 1.33 ms (+0.19 ms/min) 18.7 MiB → 10.0 MiB (−46%)
Better (3) 311 KiB 107,911 → 107,911 (0%) 1.26 ms → 1.39 ms (+0.13 ms/min) 21.5 MiB → 12.9 MiB (−40%)
Better (3) 10 MiB 255,557 → 255,557 (0%) 9.16 ms → 13.17 ms (+4.0 ms/min) 21.7 MiB → 3.1 MiB (−86%)
Best (4) 311 KiB 102,705 → 102,705 (0%) 3.96 ms → 4.25 ms (+0.29 ms/min) 51.5 MiB → 42.8 MiB (−17%)
Best (4) 10 MiB 249,954 → 249,954 (0%) 43.62 ms → 49.96 ms (+6.3 ms/min) 51.7 MiB → 33.0 MiB (−36%)

Recompression Benchmark (gzip-1 -> zstd, 311 KiB fixture)

  • Default level: 1.57 → 2.29 ms/op (+0.7 ms once per minute ≈ ~0.001% CPU), allocations −37% (109 → 68.8 KiB/op, 141 → 132 allocs/op).

How to Reproduce Locally

# Retained live heap + compressed size verification
go test -v -count=1 -run=TestSharedZstdEncoderRetainedHeap ./profiler

# Recompression throughput and allocations
go test -run=^$ -bench=BenchmarkRecompression -benchmem -count=5 ./profiler

# Full profiler test suite with race detector
go test -race ./profiler/...

All 67 CI checks (and local -race tests across GOMAXPROCS=1, 2, 4, 16) pass with zero test modifications required for byte-for-byte zstd level verification.

🤖 Generated with Claude Code

Configure newSharedZstdEncoder with WithEncoderConcurrency(1),
WithLowerEncoderMem(true), and WithWindowSize(1<<20) so the retained
encoder does not permanently hold GOMAXPROCS x 8 MiB history buffers
in live heap.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Config Audit

PACKAGE: contrib/cloud.google.com/go/pubsubtrace
  STATUS      CONFIG                                            CALL_SITES
  UNMIGRATED  DD_GOOGLE_CLOUD_PUBSUB_PROPAGATION_AS_SPAN_LINKS  1

PACKAGE: contrib/confluentinc/confluent-kafka-go/kafkatrace
  STATUS      CONFIG                            CALL_SITES
  UNMIGRATED  DD_TRACE_KAFKA_ANALYTICS_ENABLED  1

PACKAGE: crashtracker
  STATUS      CONFIG                    CALL_SITES
  STILL_READ  DD_API_KEY                1
  STILL_READ  DD_SITE                   1
  STILL_READ  DD_TAGS                   1
  UNMIGRATED  DD_CRASHTRACKING_ENABLED  1

PACKAGE: ddtrace/opentelemetry/log
  STATUS      CONFIG                    CALL_SITES
  STILL_READ  DD_ENV                    1
  STILL_READ  DD_SERVICE                1
  STILL_READ  DD_TAGS                   1
  STILL_READ  DD_TRACE_REPORT_HOSTNAME  1
  STILL_READ  DD_VERSION                1
  UNMIGRATED  DD_HOSTNAME               1
  UNMIGRATED  OTEL_RESOURCE_ATTRIBUTES  1
  UNMIGRATED  OTEL_SERVICE_NAME         1

PACKAGE: ddtrace/opentelemetry/metric
  STATUS      CONFIG                    CALL_SITES
  STILL_READ  DD_ENV                    1
  STILL_READ  DD_METRICS_OTEL_ENABLED   1
  STILL_READ  DD_SERVICE                1
  STILL_READ  DD_TAGS                   1
  STILL_READ  DD_TRACE_REPORT_HOSTNAME  1
  STILL_READ  DD_VERSION                1
  STILL_READ  OTEL_METRICS_EXPORTER     1
  UNMIGRATED  DD_HOSTNAME               1
  UNMIGRATED  OTEL_RESOURCE_ATTRIBUTES  1
  UNMIGRATED  OTEL_SERVICE_NAME         1

PACKAGE: ddtrace/tracer
  STATUS      CONFIG                                    CALL_SITES
  STILL_READ  DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT     1
  STILL_READ  DD_TRACE_PROPAGATION_EXTRACT_FIRST        1
  STILL_READ  DD_TRACE_PROPAGATION_STYLE_EXTRACT        1
  STILL_READ  DD_TRACE_PROPAGATION_STYLE_INJECT         1
  UNMIGRATED  DD_APM_TRACING_ENABLED                    1
  UNMIGRATED  DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED  1
  UNMIGRATED  DD_TRACE_DEBUG_SEELOG_WORKAROUND          1
  UNMIGRATED  OTEL_TRACES_SAMPLER_ARG                   1

PACKAGE: instrumentation
  STATUS      CONFIG                                       CALL_SITES
  STILL_READ  DD_DATA_STREAMS_ENABLED                      1
  UNMIGRATED  DD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED  1

PACKAGE: instrumentation/graphql
  STATUS      CONFIG                             CALL_SITES
  UNMIGRATED  DD_TRACE_GRAPHQL_ERROR_EXTENSIONS  1

PACKAGE: instrumentation/httptrace
  STATUS      CONFIG                                                 CALL_SITES
  UNMIGRATED  DD_GOOGLE_CLOUD_PUBSUB_PROPAGATION_AS_SPAN_LINKS       1
  UNMIGRATED  DD_HTTP_SERVER_TAG_QUERY_STRING_SIZE                   1
  UNMIGRATED  DD_TRACE_BAGGAGE_TAG_KEYS                              1
  UNMIGRATED  DD_TRACE_CLIENT_IP_ENABLED                             1
  UNMIGRATED  DD_TRACE_HTTP_SERVER_ERROR_STATUSES                    1
  UNMIGRATED  DD_TRACE_HTTP_URL_QUERY_STRING_ALLOWLIST               1
  UNMIGRATED  DD_TRACE_HTTP_URL_QUERY_STRING_ALLOWLIST_CLIENT        1
  UNMIGRATED  DD_TRACE_HTTP_URL_QUERY_STRING_ALLOWLIST_SERVER        1
  UNMIGRATED  DD_TRACE_HTTP_URL_QUERY_STRING_DISABLED                1
  UNMIGRATED  DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED               1
  UNMIGRATED  DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP               2
  UNMIGRATED  DD_TRACE_RESOURCE_RENAMING_ALWAYS_SIMPLIFIED_ENDPOINT  1
  UNMIGRATED  DD_TRACE_RESOURCE_RENAMING_ENABLED                     1

PACKAGE: instrumentation/internal/namingschema
  STATUS      CONFIG                                             CALL_SITES
  STILL_READ  DD_SERVICE                                         1
  UNMIGRATED  DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED  1

PACKAGE: internal
  STATUS      CONFIG                         CALL_SITES
  STILL_READ  DD_AGENT_HOST                  1
  STILL_READ  DD_TAGS                        1
  STILL_READ  DD_TRACE_AGENT_PORT            1
  STILL_READ  DD_TRACE_AGENT_URL             1
  UNMIGRATED  DD_EXTERNAL_ENV                1
  UNMIGRATED  DD_GIT_COMMIT_SHA              1
  UNMIGRATED  DD_GIT_REPOSITORY_URL          1
  UNMIGRATED  DD_TRACE_GIT_METADATA_ENABLED  1

PACKAGE: internal/appsec
  STATUS      CONFIG           CALL_SITES
  UNMIGRATED  DD_APPSEC_RULES  1

PACKAGE: internal/appsec/config
  STATUS      CONFIG                                                CALL_SITES
  UNMIGRATED  DD_API_SECURITY_DOWNSTREAM_BODY_ANALYSIS_SAMPLE_RATE  1
  UNMIGRATED  DD_API_SECURITY_ENABLED                               1
  UNMIGRATED  DD_API_SECURITY_MAX_DOWNSTREAM_REQUEST_BODY_ANALYSIS  1
  UNMIGRATED  DD_API_SECURITY_PROXY_SAMPLE_RATE                     1
  UNMIGRATED  DD_API_SECURITY_REQUEST_SAMPLE_RATE                   1
  UNMIGRATED  DD_API_SECURITY_SAMPLE_DELAY                          1
  UNMIGRATED  DD_APM_TRACING_ENABLED                                1
  UNMIGRATED  DD_APPSEC_AGENTIC_ONBOARDING                          1
  UNMIGRATED  DD_APPSEC_DISABLE_FEATURES                            1
  UNMIGRATED  DD_APPSEC_ENABLED                                     2
  UNMIGRATED  DD_APPSEC_MAX_STACK_TRACE_DEPTH                       1
  UNMIGRATED  DD_APPSEC_RASP_ENABLED                                1
  UNMIGRATED  DD_APPSEC_RULES                                       1
  UNMIGRATED  DD_APPSEC_SCA_ENABLED                                 1
  UNMIGRATED  DD_APPSEC_STACK_TRACE_ENABLED                         1
  UNMIGRATED  DD_APPSEC_TRACE_RATE_LIMIT                            1
  UNMIGRATED  DD_APPSEC_WAF_TIMEOUT                                 1

PACKAGE: internal/bazel
  STATUS      CONFIG                                  CALL_SITES
  UNMIGRATED  DD_TEST_OPTIMIZATION_MANIFEST_FILE      1
  UNMIGRATED  DD_TEST_OPTIMIZATION_PAYLOADS_IN_FILES  1

PACKAGE: internal/civisibility/envconfig
  STATUS      CONFIG                   CALL_SITES
  STILL_READ  DD_CIVISIBILITY_ENABLED  1

PACKAGE: internal/civisibility/integrations
  STATUS      CONFIG                                               CALL_SITES
  STILL_READ  DD_SERVICE                                           1
  STILL_READ  DD_TRACE_DEBUG                                       1
  UNMIGRATED  DD_CIVISIBILITY_CODE_COVERAGE_REPORT_UPLOAD_ENABLED  1
  UNMIGRATED  DD_CIVISIBILITY_DYNAMIC_ATR_BUCKETS                  1
  UNMIGRATED  DD_CIVISIBILITY_DYNAMIC_ATR_ENABLED                  1
  UNMIGRATED  DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_ENABLED        1
  UNMIGRATED  DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_MAX_RETRIES    1
  UNMIGRATED  DD_CIVISIBILITY_FLAKY_RETRY_COUNT                    1
  UNMIGRATED  DD_CIVISIBILITY_FLAKY_RETRY_ENABLED                  1
  UNMIGRATED  DD_CIVISIBILITY_GIT_UPLOAD_ENABLED                   1
  UNMIGRATED  DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED     1
  UNMIGRATED  DD_CIVISIBILITY_SUBTEST_FEATURES_ENABLED             1
  UNMIGRATED  DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT              1
  UNMIGRATED  DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES            1
  UNMIGRATED  DD_TEST_MANAGEMENT_ENABLED                           1

PACKAGE: internal/civisibility/integrations/gotesting
  STATUS      CONFIG                                                           CALL_SITES
  UNMIGRATED  DD_CIVISIBILITY_INTERNAL_PARALLEL_EARLY_FLAKE_DETECTION_ENABLED  2
  UNMIGRATED  DD_CIVISIBILITY_RETRY_EXECUTION_MODE                             1
  UNMIGRATED  DD_CIVISIBILITY_RETRY_PROCESS_MAX_CONCURRENCY                    1
  UNMIGRATED  DD_CIVISIBILITY_RETRY_PROCESS_TIMEOUT                            1
  UNMIGRATED  DD_TEST_MANAGEMENT_ENABLED                                       2

PACKAGE: internal/civisibility/integrations/logs
  STATUS      CONFIG                        CALL_SITES
  UNMIGRATED  DD_CIVISIBILITY_LOGS_ENABLED  1

PACKAGE: internal/civisibility/utils
  STATUS      CONFIG                              CALL_SITES
  STILL_READ  DD_SERVICE                          1
  UNMIGRATED  DD_ACTION_EXECUTION_ID              1
  UNMIGRATED  DD_PIPELINE_EXECUTION_ID            1
  UNMIGRATED  DD_TEST_OPTIMIZATION_ENV_DATA_FILE  1
  UNMIGRATED  DD_TEST_SESSION_NAME                1

PACKAGE: internal/civisibility/utils/net
  STATUS      CONFIG                             CALL_SITES
  STILL_READ  DD_API_KEY                         1
  STILL_READ  DD_CIVISIBILITY_AGENTLESS_ENABLED  1
  STILL_READ  DD_CIVISIBILITY_AGENTLESS_URL      1
  STILL_READ  DD_ENV                             1
  STILL_READ  DD_SERVICE                         1
  STILL_READ  DD_SITE                            1
  STILL_READ  DD_TAGS                            1
  STILL_READ  DD_VERSION                         1
  UNMIGRATED  DD_CODE_COVERAGE_FLAGS             1

PACKAGE: internal/civisibility/utils/telemetry
  STATUS      CONFIG                                         CALL_SITES
  UNMIGRATED  DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER  1

PACKAGE: internal/clientip
  STATUS      CONFIG                     CALL_SITES
  UNMIGRATED  DD_TRACE_CLIENT_IP_HEADER  1

PACKAGE: internal/globalconfig
  STATUS      CONFIG                           CALL_SITES
  UNMIGRATED  DD_INSTRUMENTATION_INSTALL_ID    1
  UNMIGRATED  DD_INSTRUMENTATION_INSTALL_TIME  1
  UNMIGRATED  DD_INSTRUMENTATION_INSTALL_TYPE  1

PACKAGE: internal/hostname
  STATUS      CONFIG       CALL_SITES
  UNMIGRATED  DD_HOSTNAME  1

PACKAGE: internal/namingschema
  STATUS      CONFIG                                             CALL_SITES
  UNMIGRATED  DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED  1

PACKAGE: internal/processtags
  STATUS      CONFIG                                          CALL_SITES
  UNMIGRATED  DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED  1

PACKAGE: internal/remoteconfig
  STATUS      CONFIG                                  CALL_SITES
  STILL_READ  DD_ENV                                  1
  UNMIGRATED  DD_RC_TUF_ROOT                          1
  UNMIGRATED  DD_REMOTE_CONFIGURATION_ENABLED         1
  UNMIGRATED  DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS  1

PACKAGE: internal/telemetry
  STATUS      CONFIG                                             CALL_SITES
  STILL_READ  DD_API_KEY                                         1
  STILL_READ  DD_SITE                                            1
  UNMIGRATED  DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT  1
  UNMIGRATED  DD_INSTRUMENTATION_TELEMETRY_ENABLED               1
  UNMIGRATED  DD_TELEMETRY_DEBUG                                 1
  UNMIGRATED  DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED         1
  UNMIGRATED  DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL           1
  UNMIGRATED  DD_TELEMETRY_HEARTBEAT_INTERVAL                    1
  UNMIGRATED  DD_TELEMETRY_LOG_COLLECTION_ENABLED                1
  UNMIGRATED  DD_TELEMETRY_METRICS_ENABLED                       1

PACKAGE: openfeature
  STATUS      CONFIG                                                     CALL_SITES
  STILL_READ  DD_ENV                                                     2
  STILL_READ  DD_SERVICE                                                 2
  STILL_READ  DD_VERSION                                                 2
  UNMIGRATED  DD_EXPERIMENTAL_FLAGGING_PROVIDER_SPAN_ENRICHMENT_ENABLED  1
  UNMIGRATED  DD_FLAGGING_EVALUATION_COUNTS_ENABLED                      1

PACKAGE: profiler
  STATUS      CONFIG                                    CALL_SITES
  STILL_READ  DD_API_KEY                                1
  STILL_READ  DD_ENV                                    1
  STILL_READ  DD_SERVICE                                1
  STILL_READ  DD_SITE                                   1
  STILL_READ  DD_TAGS                                   1
  STILL_READ  DD_TRACE_STARTUP_LOGS                     1
  STILL_READ  DD_VERSION                                1
  UNMIGRATED  DD_PROFILING_AGENTLESS                    1
  UNMIGRATED  DD_PROFILING_DEBUG_COMPRESSION_SETTINGS   1
  UNMIGRATED  DD_PROFILING_DELTA                        1
  UNMIGRATED  DD_PROFILING_ENABLED                      3
  UNMIGRATED  DD_PROFILING_ENDPOINT_COUNT_ENABLED       1
  UNMIGRATED  DD_PROFILING_EXECUTION_TRACE_ENABLED      1
  UNMIGRATED  DD_PROFILING_EXECUTION_TRACE_LIMIT_BYTES  1
  UNMIGRATED  DD_PROFILING_EXECUTION_TRACE_PERIOD       1
  UNMIGRATED  DD_PROFILING_FLUSH_ON_EXIT                1
  UNMIGRATED  DD_PROFILING_OUTPUT_DIR                   1
  UNMIGRATED  DD_PROFILING_UPLOAD_TIMEOUT               1
  UNMIGRATED  DD_PROFILING_URL                          1

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 74.78% (+7.64%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: fc6182d | Docs | View more details | Give us feedback!

…on ratio

Keep only WithEncoderConcurrency(1) and WithLowerEncoderMem(true) so
multi-MiB profiles keep identical compressed size while still cutting
retained live heap by ~46% (~8.7 MiB/process).

Co-Authored-By: Claude <noreply@anthropic.com>
@AliDatadog AliDatadog changed the title perf(profiler): bound shared zstd encoder concurrency and window memory perf(profiler): bound shared zstd encoder concurrency and memory Nov 25, 2026
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Nov 25, 2026
@AliDatadog
AliDatadog marked this pull request as ready for review November 25, 2026 16:33
@AliDatadog
AliDatadog requested a review from a team as a code owner November 25, 2026 16:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T16:34:16.637369Z fc6182d Draft marked ready
🔒 Security Review ✅ Completed 2026-11-25T16:36:07.520867Z fc6182d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The static reviewer’s focused compression, configuration, error-handling, and retained-heap checks support the encoder option change, with no reportable defect identified. No human PR discussion was present.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit fc6182d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant